<template>
    <van-tabbar @change="changTabbar" v-model="tabbarStore.active" active-color="#ee0a24">
        <van-tabbar-item icon="wap-home-o" to="/home">首页</van-tabbar-item>
        <van-tabbar-item icon="goods-collect-o" to="/classify">分类</van-tabbar-item>
        <van-tabbar-item icon="photo-o" to="/worth_buy">值得买</van-tabbar-item>
        <van-tabbar-item icon="shopping-cart-o"  to="/cart">购物车</van-tabbar-item>
        <van-tabbar-item icon="contact" to="/user">个人</van-tabbar-item>
    </van-tabbar>
</template>

<script setup lang="ts">
import homeStore from '@/store/home'
const tabbarStore = homeStore()

const changTabbar = (e: number) => {
  tabbarStore.setTabarNumber(e)
}

</script>

<style lang="less" scoped>

</style>